<?php
/**
 * Video Plugin for Magento
 * 
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * @category   Niveus
 * @package    Niveus_ProductVideo
 * @copyright  Copyright (c) 2013 Niveus Solutions (http://www.niveussolutions.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @author     Niveus Solutions <support@niveussolutions.com>
 */
?>

<?php 
  $_productVideos = $this->_getProductVideos();
  $a=0;

?>
<?php if($_productVideos && $_productVideos->count() > 0):?>
   <h3><?php echo $this->__('Product Videos') ?></h3>



   <?php foreach($_productVideos as $video) : ?>  
        <?php $video = $this->getCode($video);?>
        <?php $video_code=substr($video,-11,11); ?>
        <?php if($video_code !=''):?>
             <?php echo "<iframe width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/$video_code?rel=0\" frameborder=\"0\"></iframe>";?>
              <!-- video from youtube -->
        <?php endif;?>               
   <?php endforeach; ?>

<?php endif;?>
